#include<bits/stdc++.h>
using namespace std;
int n,m,a,t;
int main()
{
	freopen("arena.in","r",stdin);
	freopen("arena.out","w",stdout);
	cin>>n>>m;
	for(int i=0;i<n;i++)cin>>a;
	for(int i=0;i<m;i++)cin>>a;
	cin>>t;
	for(int i=0;i<t;i++)
	{
			cout<<1<<endl;
	}
	return 0;
}
